Kameleon-Plus  0.3.2
BATSRUSInterpolator.h
Go to the documentation of this file.
1 /*
2  * BATSRUSInterpolator.h
3  *
4  * Created on: Jun 30, 2009
5  * Author: dberrios
6  */
7 
8 #ifndef BATSRUSINTERPOLATOR_H_
9 #define BATSRUSINTERPOLATOR_H_
10 
11 #include "Interpolator.h"
12 
13 namespace ccmc
14 {
22  {
23  public:
25  float interpolate(const std::string&, const float& c0, const float& c1, const float& c2);
26  float interpolate(const std::string&, const float& c0, const float& c1, const float& c2, float& dc0,
27  float& dc1, float& dc2);
28  float interpolate(const long& variable_id, const float& c0, const float& c1, const float& c2);
29  float interpolate(const long& variable_id, const float& c0, const float& c1, const float& c2, float& dc0, float& dc1,
30  float& dc2);
31  virtual ~BATSRUSInterpolator();
32 
33  private:
34  int find_octree_block(float x, float y, float z, int old_block_number);
35  int climb_octree(int root, float x, float y, float z);
36  int nx;
37  int ny;
38  int nz;
39  int old_block;
40  int callCount;
41  float old_x;
42  float old_y;
43  float old_z;
44  long int ib, ib_c[8], ix_c[8], iy_c[8], iz_c[8];
45  float xx_c[8], yy_c[8], zz_c[8];
46  int valid_c[8];
47  const std::vector<float> * block_x_min_array;
48  const std::vector<float> * block_y_min_array;
49  const std::vector<float> * block_z_min_array;
50  const std::vector<float> * block_x_max_array;
51  const std::vector<float> * block_y_max_array;
52  const std::vector<float> * block_z_max_array;
53 
54  const std::vector<float> * block_x_center_array;
55  const std::vector<float> * block_y_center_array;
56  const std::vector<float> * block_z_center_array;
57  const std::vector<int> * block_child_id_1_array;
58  const std::vector<int> * block_child_id_2_array;
59  const std::vector<int> * block_child_id_3_array;
60  const std::vector<int> * block_child_id_4_array;
61  const std::vector<int> * block_child_id_5_array;
62  const std::vector<int> * block_child_id_6_array;
63  const std::vector<int> * block_child_id_7_array;
64  const std::vector<int> * block_child_id_8_array;
65 
66  const std::vector<int> * block_child_count_array;
67  const std::vector<int> * block_at_amr_level_array;
68 
69 
70 
71  float global_x_min;
72  float global_x_max;
73  float global_y_min;
74  float global_y_max;
75  float global_z_min;
76  float global_z_max;
77  bool previousWasValid;
78 
79  };
80 }
81 
82 #endif /* BATSRUSINTERPOLATOR_H_ */